package com.jdz.gxq.info.admin.employmentneed.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.jdz.gxq.info.admin.employmentneed.bo.Employmentneed;
import com.jdz.gxq.info.admin.employmentneed.form.EditEmploymentneedForm;
import com.jdz.gxq.info.admin.employmentneed.service.EmploymentneedService;
import com.jdz.gxq.info.common.action.CommonAction;

public class EditEmploymentneedAction extends CommonAction {

	private EmploymentneedService employmentneedService = null;
	 
	public ActionForward doExecute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws java.lang.Exception {
		
		EditEmploymentneedForm editEmploymentneedForm = (EditEmploymentneedForm) form;
	
		Employmentneed employmentneed = employmentneedService.getEmploymentneedById(editEmploymentneedForm.getId());
		
		editEmploymentneedForm.setEmploymentneed(employmentneed);

		return mapping.findForward("success");
	}

	public void setEmploymentneedService(EmploymentneedService employmentneedService) {
		this.employmentneedService = employmentneedService;
	}
}

